//##############################################################################
//#    CuteWebshot is an application which can be used to render
//#    screenshots from webpages.
//#
//#    Copyright (C) 2010  Juhapekka Piiroinen
//#
//#    This program is free software: you can redistribute it and/or modify
//#    it under the terms of the GNU General Public License as published by
//#    the Free Software Foundation, either version 3 of the License, or
//#    (at your option) any later version.
//#
//#    This program is distributed in the hope that it will be useful,
//#    but WITHOUT ANY WARRANTY; without even the implied warranty of
//#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//#    GNU General Public License for more details.
//#
//#    You should have received a copy of the GNU General Public License
//#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
//#############################################################################
//# Contact: juhapekka.piiroinen@gmail.com
//#############################################################################
#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QDir>
#include <QMainWindow>
#include "common.h"
#include <QSharedMemory>
#include <QBuffer>
#include <QWebFrame>
#include <QTimer>
#include <QImage>
#include <QNetworkProxyFactory>
#include <QNetworkProxy>
#include <QSettings>
#include <QFile>
#include <QIODevice>
#include <QWebElementCollection>
#include <QWebElement>


namespace Ui {
    class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

    void setUrl(QString);

public slots:
    void on_lineEdit_returnPressed();
    void handleLoadFinished(bool);
    void handleLoadProgress(int);
    void handleUrlChanged(QUrl);
    void renderWebshot();

signals:
    void webshotReady();

private:
    Ui::MainWindow *ui;
    QString m_url;
};

#endif // MAINWINDOW_H
